package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/*交付记录详情*/

@Entity
public class Jiaofujluxiangqing {
    private int jfjlxqId;//交录详情id
    private Productt productt;//产品(详情)id
    private Integer jfjlxqCpnum;//交录详情产品数量
    private BigDecimal jfjlxqCpprice;//交录详情产品价格
    private Jiaofujilu jiaofujiluByJlId;//交付记录对象（交录id）

    private BigDecimal jfjlxqXiaoJi;//小计

    @Basic
    @Column(name = "jfjlxq_xiaoji")
    public BigDecimal getJfjlxqXiaoJi() {
        return jfjlxqXiaoJi;
    }

    public void setJfjlxqXiaoJi(BigDecimal jfjlxqXiaoJi) {
        this.jfjlxqXiaoJi = jfjlxqXiaoJi;
    }

    @Id
    @Column(name = "jfjlxq_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getJfjlxqId() {
        return jfjlxqId;
    }

    public void setJfjlxqId(int jfjlxqId) {
        this.jfjlxqId = jfjlxqId;
    }


    @ManyToOne
    @JoinColumn(name = "productt_id", referencedColumnName = "productt_id")
    public Productt getProductt() {
        return productt;
    }

    public void setProductt(Productt productt) {
        this.productt = productt;
    }

    @Basic
    @Column(name = "jfjlxq_cpnum", nullable = true, precision = 0)
    public Integer getJfjlxqCpnum() {
        return jfjlxqCpnum;
    }

    public void setJfjlxqCpnum(Integer jfjlxqCpnum) {
        this.jfjlxqCpnum = jfjlxqCpnum;
    }

    @Basic
    @Column(name = "jfjlxq_cpprice", nullable = true, precision = 2)
    public BigDecimal getJfjlxqCpprice() {
        return jfjlxqCpprice;
    }

    public void setJfjlxqCpprice(BigDecimal jfjlxqCpprice) {
        this.jfjlxqCpprice = jfjlxqCpprice;
    }


    @ManyToOne
    @JoinColumn(name = "jl_id", referencedColumnName = "jl_id")
    public Jiaofujilu getJiaofujiluByJlId() {
        return jiaofujiluByJlId;
    }

    public void setJiaofujiluByJlId(Jiaofujilu jiaofujiluByJlId) {
        this.jiaofujiluByJlId = jiaofujiluByJlId;
    }
}
